Skip to content

feat: Add Zig bindings for C-KZG-4844#586

Closed
roninjin10 wants to merge 7 commits intoethereum:mainfrom
evmts:main
Closed

feat: Add Zig bindings for C-KZG-4844#586
roninjin10 wants to merge 7 commits intoethereum:mainfrom
evmts:main

Conversation

@roninjin10
Copy link

  • Complete KZG polynomial commitment operations for EIP-4844/EIP-7594
  • Optional embedded trusted setup with dead code elimination
  • Real cryptographic functionality with zero mocks
  • Compatible with zig fetch for dependency management

@roninjin10 roninjin10 force-pushed the main branch 2 times, most recently from b2eb7c0 to 1495d94 Compare July 17, 2025 21:36
- Complete KZG polynomial commitment operations for EIP-4844/EIP-7594
- Optional embedded trusted setup with dead code elimination
- Real cryptographic functionality with zero mocks
- Compatible with zig fetch for dependency management

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
roninjin10 and others added 4 commits July 17, 2025 14:53
- Replace git submodule approach with automatic blst download
- Download blst v0.3.15 at build time when submodule missing
- Simplify to single workflow supporting zig fetch
- Update README to reflect streamlined installation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Download blst v0.3.15 and create missing server.c file
- Add proper build dependencies to ensure files exist before compilation
- server.c includes all individual blst source files as unity build
- Tests pass with automatically downloaded blst

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Convert blst from submodule to vendored files so they're included when Zig fetches the package.
Required for Zig build process
@jtraglia
Copy link
Member

Hey @roninjin10 so I'm a big zig fan and open to having bindings for these here. It seems that there are some missing API functions though

  • verify_blob_kzg_proof_batch
  • compute_cells
  • compute_cells_and_kzg_proofs
  • recover_cells_and_kzg_proofs
  • verify_cell_kzg_proof_batch

Also, it appears that you have overwritten the blst submodule. We would like to keep it as a submodule instead of vendoring it like this PR does.

@roninjin10
Copy link
Author

Hey sorry forgot this or was even open. Been pushing to my main branch trying to get zig 15 working

@jtraglia
Copy link
Member

Ha no worries. And sorry for the slow review. Happy to work with you on this.

@roninjin10 roninjin10 marked this pull request as draft September 7, 2025 18:14
@roninjin10
Copy link
Author

Converted to a draft for now. @jtraglia I am 100% focused on releasing our new zig EVM next week but will circle back to this pr.

For reference, I believe the issue I have been running into atm is I couldn't get the zig module system when we zig fetch this to work with the submodules. This blocked me but is likely a solvable problem I just would need to fight it for a bit to figure out how to solve it.

@roninjin10
Copy link
Author

EVM is here btw. We use this library and shout you out in the readme https://github.com/evmts/guillotine

@jtraglia
Copy link
Member

Hey @roninjin10 I'm going to close this PR. Feel free to re-open if/when the bindings are ready!

@jtraglia jtraglia closed this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants